package com.example.dubbotest.service.mapper;

import com.example.dubbotest.api.pojo.TableA;
import com.example.dubbotest.api.pojo.TableB;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * Created by TJ on 2017/8/12.
 */
@Mapper
public interface UserMapper {

    @Select("select * from user")
    List<Map<String,Object>> listAll();

    @Insert("insert into table_a(name,age)value( #{name},#{age})")
    void insertA(TableA a);

    @Insert("insert into table_b(name,age)value( #{name},#{age})")
    void insertB(TableB b);

}
